1. Field of the Invention
This invention relates to a file management system and more in detail to a file management system, in which a plurality of workstations, each of which includes a respective file, are linked through a network, and which is suitable for a plurality of users to share distributed files.
2. Description of the Prior Art
A file management system, which enables a plurality of users to share files distributedly stored in a plurality of memory devices, is disclosed e.g. in USENIX 1986, Conference Proceedings, pp. 248-259.
FIG. 4A and 4B illustrate the concept of file sharing according to the prior art. In FIG. 4A reference numerals 1a and 1b represent the structure of files stored in disk devices on different workstations, node 1 and node 2. Each workstation independently manages its local files in the tree structure form, and each structure of files 1a and 1b is equivalent to what is viewed by users at each workstation when each workstation is used as a stand-alone system. For example, a user at the node 1 views "A0", called a root file, at the root position of the file structure, and three files "A1","A2" and "A3" under "A0". These files are divided into two category files. The content of the directory file is the information to point other files and to construct tree structure. "A0", "B0", "B1" and "B2" in FIG. 4A are examples of directory files. All files at leaf positions of tree structure are not files in the other category except said directory files. Since there exists a directory file which points no file at present, the directory file may appear at leaf positions of tree structure. "A1" and "A3" in FIG. 4A are the examples.
Files which are not directory files are in the other category. Generally these files are called "ordinary files". They always appear at leaf positions of tree structure. In FIG. 4A "A2", "B11", "B12", "B13", "B21" and "B22" are the examples. Each of the files contains data base data, or some object program. Arbitrary types of data may be stored in the files. An user can read or write the files and if they contain object programs he can also execute the files. There also exits a special file which corresponds to a real device. For example, read or write request to a special file corresponding to a terminal is treated as getting an input from a keyboard or displaying image on a screen respectively.
A method for managing local files in each workstation is disclosed, e.g., in Communications of the ACM, Vol. 17, pp. 365-375, July 1974. FIG. 5 shows the method by using the example of the node 1 in FIG. 4A. To manage local files, file control information 20a, directory information 21a and file body 22a are stored in the local memory device 6a. File control information 20a is a set of file control tables (30a, 30b, . . . ) corresponding to each file. Each file control table 30a consists of following fields:
file type, owner, protection, file size and address etc. PA1 1. the original file indicated by the matches entry; and PA1 2. the remaining path name of the specified file which is not processed by the management program 90a.
The file type field 31a corresponding to the file "A0" indicates "directory", and the file type field 31b corresponding to the file "A2" indicates "normal (ordinary)". Each data in address fields 32a and 32b indicates each address on the local memory device in which the content of each the file resides. For example, data on address field 32 b indicates that the content of the file "A2" resides in the area 40 in the file body area 22a.
Directory information 21a is the content of directory files. Reference numeral 40a shows the content of the directory file "A0". As stated above, a directory file contains the information for each file which is pointed by the directory file. Each information indicates what a name of the pointed file is and where a file control table for the pointed file is. In this example directory file "A0" contains the information for "A1", "A2" and "A3". Directory information 21a is distinguished from the file body 22a in this figure, but it does not mean that directory information and file body are physically separated.
Using the above method users can access any local file in each workstation by specifying a path from the root file to it on the tree structure. For example, the file "A2" (in FIG. 4A) can be specified with "A0/A2" from a user at the node 1. Omitting "A0" and specifying only "A2" is allowable in this example. A file control table for the root file "A0" is located at the predetermined position and an operating system can trace the specified path by reference file control tables and the contents of directory files corresponding to the path.
The above method enables users only to access local files stored in a workstation that the users are using, and the users cannot access remote files in another workstation. The reference numeral 3a in FIG. 4A represents a file link to extend the local file structure in node 1 to the structure including remote files in the node 2. The file link 3a links a subtree 2a, headed by a directory file "B2" in the structure of files 1b in node 2, to a branch "A1" in the structure of files 1a in the node 1. With this file link 3a, the file structure viewed from users at the node 1 becomes a new shape in which the subtree 2a is virtually attached under the directory file "A1" as shown in FIG. 4B. In other words, the file link 3a has an effect that a user can directly access to the file "B2" in the node 2. Therefore, users at the node 1 can specify and access the files "B2" and "B21" in the subtree 2a with names "A1" and "A1/B21" respectively.
FIG. 6 shows an embodiment of the file link. Before a file link is done, definitions of linkable subtrees are made at the workstation in which the subtrees reside. When a user program 12b makes a request of linkable subtree definition by specifying the head file of the subtree, for example, "B2" in FIG. 4A, the file system management program 90b searches the specified head file by referring file control information 20b and directory information 21h, and set the linkable subtree information to a management table. The management table 70 has columns to indicate a linkable subtree, accessibility to the subtree, etc. For example, the information of pointing to a file control table for the specified head file is registered in the column 71 to specify the linkable subtree.
Subtrees defined the above procedure are linkable from other workstations. For example, when a user program 12a at the node 1 makes a file link request, as shown in FIG. 4A, the file system management program 90a searches a destination file "A1" by referring file control information 20a and directory information 21a, and if found, sends a message to the file system management program 90a that a subtree headed by "B2" is requested to be linked, and waits for the answer from the file management program 90b. When the management program 90b receives the message, it checks the management table 70 and sends back the answer to the management program 90a, whether the request is granted or not. Receiving the answer, the management program 90a sets the file link information to a management table 60 if the request is granted, and answers the result to the user program 12a. The management table 60 has a column 61 for storing information indicating a destination file in the workstation, a column 62 for storing information indicating an original file to be linked in another workstation and a column 63 for storing information indicating the accessibility, etc. As for the column 61, for example, the information pointing to a file control table for a for a destination is used. As for the column 62, the information indicating a workstation in which an original file resides should be included as well as the information pointing a file control table for the file.
After the file link has been done, a file access request from a user program is treated as follows. When a user program 12a specified a file to be accessed, the file system management program 90a searches along the file tree structure by tracing a path name of the file one by one from a root file "A0". At each point of the tree, the management program 90a refers the management table 60 first. If there is no entry indicating said accessed file in link destination column 61 at the position that the management program 90a is currently processing, the management program 90a advances next position in the tree structure by referring file control information 20a and directory information 21a. If there is an entry indicating said accessed file, the management program 90a sends a file access message to a file system management program in another workstation in which the subtree indicated by an original file column of the matched entry resides, and waits for the answer. The file access message includes the following information:
When a file system management program in the another workstation receives the file access message, it searches the requested file from the position of the specified original file with the remaining path name passed by the message, and sends the answer. The algorithm of management program in the another workstation is the same as that in the management program 90a. When the answer is received, the management program 90a returns the result to the user program 12a. For example, when the user program 12a makes a file access request of "A2", the request is locally processed by the management program 90a. When the user program 12a makes a file access request of "A1/B21", however, the management program 90a finds at the position of "A1" that a file access message should be sent to a management program 90b. The message that the original file is "B2" and that the remaining path name is "B21". Receiving the message, the management program 90b starts accessing "B21" through "B2", and sends back the answer when the file management program 90b finds file "B21". In the above explanation, a user program which accesses a remote file by using the file link is the same program, but they may be different programs.
According to the conventional system described above, there is a problem that the extension of the file structure by the link of file structures has influence on all the users utilizing the same workstation. For example, in the case where a plurality of users utilize a workstation, if one of them effects the extension of the file structure, the file structure viewed from the other users varies without their knowing it. Further, in the case where a plurality of users utilize successively a workstation, if a preceding user has extended the file structure and leaves it as it is, this gives rise to a problem that the succeeding user utilizes the extended file.